/*
 * XML Type:  XSource
 * Namespace: http://www.seedwill.com/xul/core
 * Java type: com.seedwill.xul.core.XSource
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.core.impl;
/**
 * An XML XSource(@http://www.seedwill.com/xul/core).
 *
 * This is a complex type.
 */
public class XSourceImpl extends com.seedwill.xul.core.impl.XIdentifiedImpl implements com.seedwill.xul.core.XSource
{
    private static final long serialVersionUID = 1L;
    
    public XSourceImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SCHEMA$0 = 
        new javax.xml.namespace.QName("", "schema");
    private static final javax.xml.namespace.QName SCHEMATYPE$2 = 
        new javax.xml.namespace.QName("", "schemaType");
    private static final javax.xml.namespace.QName SOURCECATE$4 = 
        new javax.xml.namespace.QName("", "sourceCate");
    private static final javax.xml.namespace.QName SOURCETYPE$6 = 
        new javax.xml.namespace.QName("", "sourceType");
    private static final javax.xml.namespace.QName REFER$8 = 
        new javax.xml.namespace.QName("", "refer");
    
    
    /**
     * Gets the "schema" element
     */
    public java.lang.String getSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "schema" element
     */
    public org.apache.xmlbeans.XmlString xgetSchema()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMA$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "schema" element
     */
    public void setSchema(java.lang.String schema)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SCHEMA$0);
            }
            target.setStringValue(schema);
        }
    }
    
    /**
     * Sets (as xml) the "schema" element
     */
    public void xsetSchema(org.apache.xmlbeans.XmlString schema)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMA$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SCHEMA$0);
            }
            target.set(schema);
        }
    }
    
    /**
     * Gets the "schemaType" element
     */
    public java.lang.String getSchemaType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMATYPE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "schemaType" element
     */
    public org.apache.xmlbeans.XmlString xgetSchemaType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMATYPE$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "schemaType" element
     */
    public void setSchemaType(java.lang.String schemaType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SCHEMATYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SCHEMATYPE$2);
            }
            target.setStringValue(schemaType);
        }
    }
    
    /**
     * Sets (as xml) the "schemaType" element
     */
    public void xsetSchemaType(org.apache.xmlbeans.XmlString schemaType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SCHEMATYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SCHEMATYPE$2);
            }
            target.set(schemaType);
        }
    }
    
    /**
     * Gets the "sourceCate" element
     */
    public com.seedwill.xul.core.XSourceCate.Enum getSourceCate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SOURCECATE$4, 0);
            if (target == null)
            {
                return null;
            }
            return (com.seedwill.xul.core.XSourceCate.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "sourceCate" element
     */
    public com.seedwill.xul.core.XSourceCate xgetSourceCate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSourceCate target = null;
            target = (com.seedwill.xul.core.XSourceCate)get_store().find_element_user(SOURCECATE$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "sourceCate" element
     */
    public void setSourceCate(com.seedwill.xul.core.XSourceCate.Enum sourceCate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SOURCECATE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SOURCECATE$4);
            }
            target.setEnumValue(sourceCate);
        }
    }
    
    /**
     * Sets (as xml) the "sourceCate" element
     */
    public void xsetSourceCate(com.seedwill.xul.core.XSourceCate sourceCate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSourceCate target = null;
            target = (com.seedwill.xul.core.XSourceCate)get_store().find_element_user(SOURCECATE$4, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XSourceCate)get_store().add_element_user(SOURCECATE$4);
            }
            target.set(sourceCate);
        }
    }
    
    /**
     * Gets the "sourceType" element
     */
    public com.seedwill.xul.core.XSourceType.Enum getSourceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SOURCETYPE$6, 0);
            if (target == null)
            {
                return null;
            }
            return (com.seedwill.xul.core.XSourceType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "sourceType" element
     */
    public com.seedwill.xul.core.XSourceType xgetSourceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSourceType target = null;
            target = (com.seedwill.xul.core.XSourceType)get_store().find_element_user(SOURCETYPE$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "sourceType" element
     */
    public void setSourceType(com.seedwill.xul.core.XSourceType.Enum sourceType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SOURCETYPE$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SOURCETYPE$6);
            }
            target.setEnumValue(sourceType);
        }
    }
    
    /**
     * Sets (as xml) the "sourceType" element
     */
    public void xsetSourceType(com.seedwill.xul.core.XSourceType sourceType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.core.XSourceType target = null;
            target = (com.seedwill.xul.core.XSourceType)get_store().find_element_user(SOURCETYPE$6, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.core.XSourceType)get_store().add_element_user(SOURCETYPE$6);
            }
            target.set(sourceType);
        }
    }
    
    /**
     * Gets the "refer" element
     */
    public java.lang.String getRefer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFER$8, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "refer" element
     */
    public org.apache.xmlbeans.XmlString xgetRefer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFER$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "refer" element
     */
    public boolean isSetRefer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REFER$8) != 0;
        }
    }
    
    /**
     * Sets the "refer" element
     */
    public void setRefer(java.lang.String refer)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFER$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFER$8);
            }
            target.setStringValue(refer);
        }
    }
    
    /**
     * Sets (as xml) the "refer" element
     */
    public void xsetRefer(org.apache.xmlbeans.XmlString refer)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFER$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(REFER$8);
            }
            target.set(refer);
        }
    }
    
    /**
     * Unsets the "refer" element
     */
    public void unsetRefer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REFER$8, 0);
        }
    }
}
